Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.6] Feature ignoreArrayOrder #108

Merged
merged 6 commits into from
Jan 12, 2024
Merged

[2.6] Feature ignoreArrayOrder #108

merged 6 commits into from
Jan 12, 2024

Conversation

rez1dent3
Copy link
Member

@rez1dent3 rez1dent3 commented Jan 12, 2024

Option to disable sorting check inside the array. By default, the sorting is checked.

Example:

- service: MicroService
  method: SayHello
  input:
    ignoreArrayOrder: true
    equals:
      v1:
        - {{ uuid2base64 "77465064-a0ce-48a3-b7e4-d50f88e55093" }}
        - {{ uuid2base64 "99aebcf2-b56d-4923-9266-ab72bf5b9d0b" }}
        - {{ uuid2base64 "5659bec5-dda5-4e87-bef4-e9e37c60eb1c" }}
        - {{ uuid2base64 "ab0ed195-6ac5-4006-a98b-6978c6ed1c6b" }}
  output:
    data:
      code: 1000

Application:

	r1, err := c.SayHello(context.Background(), &pb.Request{V1: [][]byte{
		u2bytes("ab0ed195-6ac5-4006-a98b-6978c6ed1c6b"), // 3
		u2bytes("99aebcf2-b56d-4923-9266-ab72bf5b9d0b"), // 1
		u2bytes("5659bec5-dda5-4e87-bef4-e9e37c60eb1c"), // 2
		u2bytes("77465064-a0ce-48a3-b7e4-d50f88e55093"), // 0
	}})
	if err != nil {
		log.Fatalf("error from grpc: %v", err)
	}
	log.Printf("Result: %d", r1.Code)

@rez1dent3 rez1dent3 added the enhancement New feature or request label Jan 12, 2024
@rez1dent3 rez1dent3 self-assigned this Jan 12, 2024
@rez1dent3 rez1dent3 merged commit 8ea8400 into latest Jan 12, 2024
4 checks passed
@rez1dent3 rez1dent3 deleted the ignoreArrayOrder branch January 12, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant